package com.unknown.wiki.domain;

import java.util.Date;
import java.util.Objects;

/**
 * Description: Github wiki Domain
 *
 * @author ankh
 * @since 31.01.2019
 */
public class WikiDomain {

    private int id;
    private int projectId;
    private Date createTime;
    private Date updateTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WikiDomain that = (WikiDomain) o;
        return id == that.id &&
                projectId == that.projectId &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, projectId, createTime, updateTime);
    }

    @Override
    public String toString() {
        return "WikiDomain{" +
                "id=" + id +
                ", projectId=" + projectId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
